use axum::{Router, routing};
use std::sync::Arc;

use crate::app_service::AppService;
use crate::handlers::users::{add, index, list, update_by_name};

pub fn get_routes() -> Router<Arc<AppService>> {
    Router::new()
        .route("/", routing::get(index))
        .route("/list", routing::get(list))
        .route("/updateByName", routing::post(update_by_name))
        .route("/add", routing::post(add))
}
